module.exports = function(config){
    config.set({
        basePath:'',
        frameworks:['jasmine'],
        // 添加测试文件+被测试文件             "tests/unit/**/*.spec.js"
        files:[
            "tests/unit/**/*.js"
        ],
        exclude:[],
        reporters:['progress','coverage'],
        preprocessors:{
            "tests/**/*.js":['webpack','coverage']
        },
        coverageReporter:{
            type:'html',
            dir:'docs/coverage/'
        },
        port:9876,
        colors:true,
        logLevel:config.LOG_INFO,
        autoWatch:true,
        browsers:['Chrome'],
        // 小黑窗里执行
        singleRun:true,
        concurrency:Infinity,
        webpack:{
            module:{
                rules:[
                    {
                        test:/\.js$/,
                        use:{
                            loader: 'istanbul-instrumenter-loader',
                            options: { esModules: true }
                        },
                        enforce:'pre',
                        exclude:/node_modules/
                    },
                    {
                        test:/\.js$/,
                        use:{
                            loader:'babel-loader'
                        },
                        exclude:/node_modules/
                    }
                ]
            }
        }
    })
}